<!--{if !$_G[in_ajax]}-->
<div class="mainrail subject reviews">

    <!--{if $detail[firstuid]}-->
        <em>第一个点评：<span class="member-ico"><a href="{url space/index/uid/$detail[firstname]}" target="_blank">$detail[firstname]</a></span></em>
    <!--{/if}-->
    <ul class="subtab" id="subtab">
        <li class="selected" id="tab_review"><a href="{url item/detail/id/$sid}#review" onfocus="this.blur()" onclick="return get_review('item_subject',$detail[sid]);">会员点评</a></li>
        {if $detail[voice_reviews]}
        <li{if $voice_review} class="selected"{/if} id="tab_review"><a href="{url review/item/type/voice/sid/$sid/}" onfocus="this.blur()">语音点评</a></li>
        {/if}
        <!--{if $catcfg[gusetbook]}-->
        <li id="tab_guestbook"><a href="{url item/guestbook/sid/$subject[sid]}" onfocus="this.blur()">会员留言</a></li>
        <!--{/if}-->
        <!--{if check_module('group') && $groups > 0}-->
        <script type="text/javascript" src="{URLROOT}/static/javascript/group.js"></script>
        <li id="tab_group"><a href="{url group/item/sid/$sid}#group" onfocus="this.blur()" onclick="return group_topics_subject($detail[sid]);">小组话题</a></li>
        <!--{/if}-->
		<!--{if $catcfg[forum] && $detail['forumid'] > 0}-->
		<li id="tab_forum"><a href="{url item/detail/id/$sid/view/forum}#forum" onfocus="this.blur()" onclick="return get_forum_threads($detail[forumid],1,$detail[sid]);">论坛讨论</a></li>
		<!--{/if}-->
    </ul>
    <div class="clear"></div>

<!--{/if}-->

    <div id="display">

        <!--{if $detail[reviews] > 0 && $MOD[show_detail_vs_review]}-->
        <!-- 最有用的好差评 -->
        <div class="vs-mod">
            <div class="vs-mod-good">
                <h3>最有用的好评</h3>
                <!--{get:review val=review(idtype/item_subject/id/$detail[sid]/best/2/orderby/flowers DESC/rows/1)}-->
                <div class="vs-mod-info">
                    <em>{$val[flowers]}鲜花/{$val[responds]}回应</em>
                    <h4><a href="{url review/detail/id/$val[id]}">$val[title]</a></h4>
                    <div class="reviewpoint">
                        <!--{loop $reviewpot $_val}-->
                        <span>{$_val[name]}:{print $val[$_val[flag]]}</span>
                        <!--{/loop}-->
                        <!--{eval 
                            $reviewurl = '...<a href="' . url("review/detail/id/".$val[rid]) . '">[查看全文]</a>';
                            $val[content] = trimmed_title(str_replace('　','',$val[content]),80,$reviewurl);
                        }-->
                    </div>
                    <p><a href="{url space/index/uid/$val[uid]}">{$val[username]}</a>：{print ($val[content])}</p>
                </div>
                <!--{/get}-->
            </div>
            <div class="vs-mod-split"></div>
            <div class="vs-mod-bad">
                <h3>最有用的差评</h3>
                <!--{get:review val=review(idtype/item_subject/id/$detail[sid]/best/0/orderby/flowers DESC/rows/1)}-->
                <div class="vs-mod-info">
                    <em>{$val[flowers]}鲜花/{$val[responds]}回应</em>
                    <h4><a href="{url review/detail/id/$val[id]}">$val[title]</a></h4>
                    <div class="reviewpoint">
                        <!--{loop $reviewpot $_val}-->
                        <span>{$_val[name]}:{print $val[$_val[flag]]}</span>
                        <!--{/loop}-->
                        <!--{eval 
                            $reviewurl = '...<a href="' . url("review/detail/id/".$val[rid]) . '">[查看全文]</a>';
                            $val[content] = trimmed_title(str_replace('　','',$val[content]),70,$reviewurl);
                        }-->
                    </div>
                    <p><a href="{url space/index/uid/$val[uid]}">{$val[username]}</a>：{print ($val[content])}</p>
                </div>
                <!--{/get}-->
            </div>
            <div class="clear"></div>
        </div>
        <!--{/if}-->

        <div class="subrail" style="margin-top:10px;margin-bottom:10px;">
            筛选：<span{if $review_filter=='all'} class="selected"{/if} id="review_filter_all"><a href="#" onclick="return get_review('item_subject',$id,'all','$review_orderby',1);" onfocus="this.blur();">综合</a></span>
            <span{if $review_filter=='best'} class="selected"{/if} id="review_filter_best"><a href="#" onclick="return get_review('item_subject',$id,'best','$review_orderby',1);" onfocus="this.blur();">好评</a></span>
            <span{if $review_filter=='bad'} class="selected"{/if} id="review_filter_bad"><a href="#" onclick="return get_review('item_subject',$id,'bad','$review_orderby',1);" onfocus="this.blur();">差评</a></span>
            <span{if $review_filter=='pic'} class="selected"{/if} id="review_filter_pic"><a href="#" onclick="return get_review('item_subject',$id,'pic','$review_orderby',1);" onfocus="this.blur();">图文</a></span>
            <span{if $review_filter=='digest'} class="selected"{/if} id="review_filter_digest"><a href="#" onclick="return get_review('item_subject',$id,'digest','$review_orderby',1);" onfocus="this.blur();">精华</a></span>
            <span class="xsplit">|</span>
            排序：<span{if $review_orderby=='posttime'} class="selected"{/if} id="review_order_posttime"><a href="#" onclick="return get_review('item_subject',$id,'$review_filter','posttime',1);" onfocus="this.blur()">最新点评</a></span>
            <span{if $review_orderby=='flower'} class="selected"{/if} id="review_order_flower"><a href="#" onclick="return get_review('item_subject',$id,'$review_filter','flower',1);" onfocus="this.blur()">最多鲜花</a></span>
            <span{if $review_orderby=='respond'} class="selected"{/if} id="review_order_respond"><a href="#" onclick="return get_review('item_subject',$id,'$review_filter','respond',1);" onfocus="this.blur()">最多回应</a></span>
        </div>

        <!--{if $detail[reviews] || $total}-->

		<!--{eval $index=1;}-->
        <!--{dbres $reviews $val}-->
        <div class="review">
            {eval if($val[hide_name])$val[uid]=0;}
            <div class="member m_w_item">
                <!--{if $val[uid]}-->
                <a href="{url space/index/uid/$val[uid]}" show="member_vcard" rel="{url member/vcard/uid/$val[uid]}"><img src="{print get_face($val[uid])}" class="face" alt="$val[username]"></a>
                <!--{else}-->
                <img src="{print get_face($val[uid])}" class="face">
                <!--{/if}-->
                <ul>
                    <!--{if $val[uid]}-->
                    <li>{print:member group(groupid/$val[groupid]/color/1)}</li>
                    <li>积分:<span>$val[point]</span></li>
                    <!--{else}-->
                    <li>{if $val[hide_name]}匿名{else}游客{/if}</li>
                    <!--{/if}-->
                </ul>
            </div>
            <div class="field f_w_item">
                <div class="feed">
                    <em>
                        <!--{if $user->isLogin && $user->uid==$val[uid]}-->
                        <span class="icomoon icon-pencil"></span><a href="{url review/member/ac/edit/op/edit/rid/$val[rid]}">编辑</a>
                        <!--{/if}-->
                        <span class="icomoon icon-bubbles"></span><a href="javascript:get_respond('$val[rid]');">回应</a>(<span id="respond_$val[rid]">$val[responds]</span>)
                        <span class="icomoon icon-flower"></span><a href="javascript:add_flower($val[rid]);">鲜花</a>(<a href="javascript:get_flower($val[rid]);"><span id="flower_$val[rid]">$val[flowers]</span></a>)
                        <a href="javascript:post_report($val[rid]);">举报</a>
                    </em>
                    <!--{if $val[uid]}-->
                    <span class="icomoon icon-user"></span><a href="{url space/index/uid/$val[uid]}">$val[username]</a>
                    <!--{else}-->
                    <span class="font_3">{if $val[hide_name]}匿名{else}游客{/if}({print preg_replace("/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/","\\1.\\2.*.*", $val[ip])})</span>
                    <!--{/if}-->
                    在 {date $val[posttime], 'w2style'} 进行了点评{if $val[source]=='1'}<span class="font_3"><img src="{URLROOT}/static/images/common/mobile.gif" alt="手机发布" /></span>{/if}
                </div>

                <!--{if display('review:viewdigest',array('digest'=>$val[digest],'uid'=>$val[uid]))}-->
                <div class="info{if $val[digest]} review-digest{/if}">
                    <ul class="score">
                        <!--{loop $reviewpot $_val}-->
                        <li>$_val[name]</li><li class="start{print cfloat($val[$_val[flag]])}"></li>
                        <!--{/loop}-->
                    </ul>

                    <div class="clear"></div>

                    <!--{if $val[pictures]}-->
                    <div class="pictures">
                        <!--{eval $val[pictures] = unserialize($val[pictures]);}-->
                        <!--{loop $val[pictures] $picid $pic}-->
                        <a href="{url item/album/picid/$picid}"><img src="{URLROOT}/$pic[thumb]" onmouseover="tip_start(this);" /></a>
                        <!--{/loop}-->
                    </div>
                    <!--{/if}-->

                    <div style="min-height:28px;">
                        {if $val[title]}<h4 class="title"><a href="{url review/detail/id/$val[rid]}">$val[title]</a></h4>{/if}
                        <!--{eval 
                            $reviewurl = '...<a href="' . url("review/detail/id/".$val[rid]) . '">[查看全文]</a>';
                            $val[content] = trimmed_title($val[content],500,$reviewurl);
                        }-->
                        <!--{if $val[voice_file]}-->
                        <div class="voicefile" id="voicefile_$val[rid]" style="margin:5px 0;">
                            <object type="application/x-shockwave-flash" data="{URLROOT}/static/images/dewplayer-mini.swf?mp3={URLROOT}/$val[voice_file]" width="160" height="20" id="dewplayer-mini"><param name="wmode" value="transparent" /><param name="movie" value="{URLROOT}/static/images/dewplayer-mini.swf?mp3={URLROOT}/$val[voice_file]" /></object>
                        </div>
                        <!--{/if}-->
                        <p>{print nl2br($val[content])}</p>
                        <ul class="params">
                            <li>总体评价：<span class="font_2">{if $val[best]=='2'}好{elseif $val[best]=='1'}一般{else}不好{/if}</span></li>
                            <!--{if $val[price] && $catcfg['useprice']}-->
                            <li>$catcfg[useprice_title]: <span class="font_2">$val[price]{$catcfg[useprice_unit]}</span></li>
                            <!--{/if}-->
                            <!--{eval $detail_tags = $val['taggroup'] ? @unserialize($val['taggroup']) : array();}-->
                            <!--{loop $taggroups $_key $_val}-->
                                <!--{if $detail_tags[$_key]}-->
                                    <li>$_val[name]:
                                    <!--{loop $detail_tags[$_key] $tagid $tagname}-->
                                        <a href="{url item/tag/tagname/$tagname}">{print _T($tagname)}</a>
                                    <!--{/loop}-->
                                    </li>
                                <!--{/if}-->
                            <!--{/loop}-->
                        </ul>
                    </div>

                    <div id="flowers_$val[rid]"></div>
                    <div id="responds_$val[rid]"></div>
                </div>
                <!--{else}-->
                <div>
                    <!--{eval $val[content] = trimmed_title($val[content],50,'...');}-->
                    <p style="margin:10px;color:#323232;line-height:18px;">$val[content]</p>
                </div>
                <div class="review-digest-message">
                    <!--{if !$user->isLogin}-->
                    <a href="javascript:dialog_login();">登录后查看精华点评全部内容</a>
                    <!--{else}-->
                    <a href="javascript:review_view_digst($val[rid]);">查看精华点评全部内容</a>（第一次查看需要购买）
                    <!--{/if}-->
                </div>
                <!--{/if}-->
            </div>
            <div class="clear"></div>
        </div>
		<!--{if $index==1}-->
		<div id="adv_1"></div>
		<!--{/if}-->
		<!--{eval $index++;}-->
        <!--{/dbres}-->

        <!--{if $multipage}-->
        <div class="multipage">$multipage</div>
        <!--{/if}-->

        <!--{else}-->
        <div class="messageborder"><span class="msg-ico">暂无点评，<a href="{url review/member/ac/add/type/item_subject/id/$id}">发表您的点评信息</a>！</span></div>
        <!--{/if}-->

<!--{if !$_G[in_ajax]}-->
    </div>

    <!--{if !$review_enable && !$user->isLogin}-->
        <div class="messageborder">
            <span class="msg-ico">想要点评<a href="#top"><span class="font_2">$detail[name].$detail[subname]</span></a>? 请先<a href="{url member/login}"><span class="font_2">登录</span></a>或<a href="{url member/reg}"><span class="font_2">快速注册</span></a></span>
        </div>
    <!--{/if}-->

</div>
<!--{/if}-->

<!--{if $review_enable}-->
<div class="mainrail subject mt10">
    <h3 class="rail-h-2 rail-h-bm-3">发布点评</h3>
    <div id="review_post_foo" style="margin-top:10px;"></div>
    <script type="text/javascript">
    <!--
        post_review('item_subject', $detail['sid'],'review_post_foo');
    //-->
    </script>
</div>
<!--{/if}-->